
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ page import="java.io.* ,java.util.*, java.sql.*, Login.*"%>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>:: Shanti Chakra Foundation ::</title>
<link href="style.css" rel="stylesheet" type="text/css">

</head>
<script language = "javascript">
  
  	function validate(form1)
	{
		if (document.getElementById("rcheck").checked==false)
		{		alert("Select any Record");
				document.getElementById("rcheck").focus;
				return false;
		}
		else
		return true;
	}
	function validate1(search1)
    { 
	if (search1.searchmem.value == "")
		{		
		alert("Enter search value ");
		return (false);
		}
	}
</script>

<body bgcolor="#0D62A2">
<p>
<a href="RegisteredMembers.jsp"> Back</a>
<%
int count = 0;
MySqlConnector ms = new MySqlConnector();
PreparedStatement stmt1;
ResultSet rs1 ;
ms.Connect();
// All members
String q = " SELECT memberid , name, surname, sex, mobile, email  FROM registration where status = 1 ; " ;
stmt1 = ms.Connect().prepareStatement(q);
rs1 = stmt1.executeQuery();
%>
</p>

<form action="ActiveMembers1.jsp" name ="search1"> 
<table width="455" height="56" bordercolor="#FFFFFF" >
<tr>
<tr><h3 style="background-color:#CCCCCC">Search through Member id or Name of member.</h3></tr>
  <td width="337">
    <div align="center"><span class="greentext">Enter Member ID: </span> 
        <input name="searchmem" id="searchmem" type="text">
        <input name="search" id = "search" type="submit" value="Search" onClick="return validate1(this.form)">
    </div></td>
</tr>
</table>
</form>
<form name="form1" method="post" action = "ManageMembers" onSubmit="return validate(this.name)">
<table width="679" border="1" align="left"  bordercolor="#FFFFFF" class="greenlink_no_left_padding">
<tr>
<td height="33" colspan="8" bgcolor="#D8F2C9" class="style4"> 
<h2 align="center" class="style15">Active Members List </h2></td>
</tr>
<tr></tr>
<tr>
<td class="style12"><span class="greentext">Member ID </span></td>
<td class="greentext">Full Name </td>
<td class="greentext">Gender</td>
<td class="greentext"><span class="greentext">Mobile</span></td>
<td class="greentext"><span class="greentext">Mail ID </span></td>
</tr>
<% while(rs1.next()==true)
{%>
<tr>
<td width="94" class="bluetext"><span class="style8"><%=rs1.getString(1)%> &nbsp;</span></td>
<td width="137" class="bluetext"><span class="style8"><%=rs1.getString(2)%>. <%=rs1.getString(3)%> </span></td>
<td width="101" class="bluetext"><span class="style8"><%=rs1.getString(4)%></span></td>
<td width="102" class="bluetext"><span class="style8"><%=rs1.getString(5)%></span></td>
<td width="180" class="bluetext"><span class="style8"><%=rs1.getString(6)%></span></td>
</tr> <% count = count + 1;
}%>
<tr align="right">
      <td colspan="6" bgcolor="#D8F2C9" ><div align="right"><span class="redtext"><strong>Total (<%=count%>)&nbsp;</strong></span><span class="style18" ><strong>&nbsp;&nbsp;</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span> </div></td>
    </tr>
</table>

</form>
</body>
</html>